<?php
namespace app\controller;

use think\App;

class Common extends Base
{
    public $microsecond;

    public function __construct()
    {
        $this->microsecond();
    }

    /**
     * 获取毫秒数
     */
    public function microsecond()
    {
        $t = explode(' ', microtime());
        $this->microsecond = round(round($t[1].substr($t[0], 2, 3)));
    }

    public function __call($method, $args)
    {
        $res = [
            'code' => '3100',
            'msg' => '没有找到该方法 【' . Request()->action() . '】',
            'status' => 'error',
        ];
        return json($res, 400);
    }
}